-- GENERATED SPELL FOR [Highlord Taelan Fordring] --


function spell0_1842(pUnit, Event) --@Crusader Strike,n/a--
pUnit:FullCastSpellOnTarget(14518,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1842', 30347, 1)
end

function spell1_1842(pUnit, Event) --@Devotion Aura,Self--
pUnit:FullCastSpellOnTarget(17232,pUnit)
pUnit:RegisterEvent('Sorts_1842', 669, 1)
end

function spell2_1842(pUnit, Event) --@Holy Cleave,n/a--
pUnit:FullCastSpellOnTarget(18819,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1842', 0, 1)
end

function spell3_1842(pUnit, Event) --@Holy Light,Heal--
pUnit:FullCastSpellOnTarget(15493,pUnit)
pUnit:RegisterEvent('Sorts_1842', 2500, 1)
end

function spell4_1842(pUnit, Event) --@Holy Strike,n/a--
pUnit:FullCastSpellOnTarget(17143,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1842', 559, 1)
end

function spell5_1842(pUnit, Event) --@Lay on Hands,Heal--
pUnit:FullCastSpellOnTarget(17233,pUnit)
pUnit:RegisterEvent('Sorts_1842', 647, 1)
end

function Sorts_1842(pUnit, Event)
local choix_sorts_1842 = math.random(0, 5)
if choix_sorts_1842 == 0 then
pUnit:RegisterEvent('spell0_1842', 1, 1)
end
if choix_sorts_1842 == 1 then
pUnit:RegisterEvent('spell1_1842', 1, 1)
end
if choix_sorts_1842 == 2 then
pUnit:RegisterEvent('spell2_1842', 1, 1)
end
if choix_sorts_1842 == 3 then
pUnit:RegisterEvent('spell3_1842', 1, 1)
end
if choix_sorts_1842 == 4 then
pUnit:RegisterEvent('spell4_1842', 1, 1)
end
if choix_sorts_1842 == 5 then
pUnit:RegisterEvent('spell5_1842', 1, 1)
end
end

function mob1842_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1842', math.random(1500, 3000), 1)
end

function mob1842_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1842_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1842_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1842, 1, 'mob1842_Action')
RegisterUnitEvent(1842, 2, 'mob1842_Leave')
RegisterUnitEvent(1842, 3, 'mob1842_Kill')
RegisterUnitEvent(1842, 4, 'mob1842_Die')
